package anylise;

import configMeta.ConfigFolderListMeta;
import utils.FileUtils;

import java.io.File;

/**
 * 每个文件的FileName及为加载的QueueName
 */
public class TypeSingleAnalyzer extends ScanFolderAnalyzerBasic
{
    private static String[] TYPES = {"Single"};

    @Override
    public void analysisFolder(ConfigFolderListMeta _folderMeta)
    {
        File folderFile = new File(_folderMeta.path);
        if (folderFile.isDirectory())
        {
            for (File subFile : folderFile.listFiles())
            {
                String fileName = FileUtils.getFileNameNoEx(subFile.getName());
                tryToPackCurrentFile(subFile, fileName, _folderMeta.releasePath);
            }
        } else
        {
            System.err.println("File : " + folderFile.getAbsolutePath() + "  is not an folder");
        }
    }

    @Override
    protected String[] getInterestedFolderTypeArray()
    {
        return TYPES;
    }
}
